<!DOCTYPE html>
<html>
<#include "../head.html">
<body class="full">
<div class="mc">
    <div class="mc-l">
        <!--左侧导航---{-->
        <div id="navPanelContainer">
            <div class="system-logo cd"></div>
            <!--管理员信息---{-->
            <#include "../adminInfo.html">
                <!--管理员信息---}-->
                <div class="nav-wrap">
                    <#include "left.html">
                </div>
        </div>
        <!--左侧导航---}-->
    </div>
    <div class="mc-m">
        <div class="navToggle"></div>
    </div>
    <div class="mc-r">
        <!--顶部导航---{-->
        <#include "../topNav.html">
            <!--顶部导航---}-->

            <!--面包屑导航---{-->
            <#assign moduleName="红包管理">
                <#include "banner.html">
                    <!--面包屑导航---}-->

                    <!--工具栏--{-->
                    <div id="toolbar" class="clearfix">
                        <#if param??&&param.status??>
                            <#assign status=(param.get("status"))?number >
                                <#else>
                                    <#assign status=-1>
                        </#if>
                        <div class="toolbor-module search">
                            <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                        </div>

                        <div class="toolbor-module search">
                            <div class="formTit">状态：</div>
                            <div class="select-box" id="status">
                                <div class="tag-select">全部</div>
                                <ul class="tag-options">
                                    <li data-value="">全  部</li>
                                    <li data-value="1">已兑换</li>
                                    <li data-value="2">未兑换</li>
                                </ul>
                            </div>
                        </div>

                        <div class="toolbor-module search">
                            <div class="formTit">红包类型：</div>
                            <div class="select-box" id="type">
                                <div class="tag-select">全部</div>
                                <ul class="tag-options">
                                    <li data-value="">全  部</li>
                                    <li data-value="01">充值</li>
                                    <li data-value="02">注册</li>
                                    <li data-value="03">认证</li>
                                    <li data-value="04">邀请</li>
                                    <li data-value="05">首次投标</li>
                                    <li data-value="81">邀请他人奖</li>
                                </ul>
                            </div>
                        </div>

                        <div class="toolbor-module search">
                            <div class="formTit">用户名：</div>
                            <input type="text" name="showName" id="showName" value="请输入用户名"  class="search-value">
                        </div>


                    </div>
                    <!--工具栏--}-->

                    <div id="main" class="clearfix">
                        <form action="" method="post">
                            <table class="data-list">
                                <tr class="header">
                                    <td>序号(ID)</td>
                                    <td>用户</td>
                                    <td>红包额度</td>
                                    <td>红包类型</td>
                                    <td>使用比例</td>
                                    <td>期限限制</td>
                                    <td>到期时间</td>
                                    <td>创建时间</td>
                                    <td>是否兑换</td>
                                </tr>
                                <#import "../../common/function.html" as func>
                                    <#list list as item>
                                        <tr class="s">
                                            <td>${item.id?c}</td>
                                            <td>${item.user.showName!}</td>
                                            <td>${item.redPacketAmount!}</td>
                                            <td>
                                                <#if item.redPacketType??&&item.redPacketType=="01">充值
                                                    <#elseif item.redPacketType=="02">注册
                                                        <#elseif item.redPacketType=="03">认证
                                                            <#elseif item.redPacketType=="04">邀请
                                                                <#elseif item.redPacketType=="05">首次投标
                                                                    <#elseif item.redPacketType=="81">邀请他人
                                                                        <#else>其他
                                                </#if>
                                            </td>
                                            <td>${item.aprLimit}%</td>
                                            <td>${item.timeLimit}天</td>
                                            <td>${item.validDate}</td>
                                            <td>${item.createDate}</td>
                                            <#if item.exchangeRecord??>
                                                <td style="color:green;">已兑换</td>
                                                <#else>
                                                    <td>未兑换</td>
                                            </#if>
                                        </tr>
                                    </#list>
                            </table>
                        </form>

                        <!--底部工具栏--{-->
                        <div id="bottomToolbar" class="clearfix">
                            <div class="other-tool">
                                <dl class="refresh-data">
                                    <dt class="refresh-data-icon"></dt>
                                    <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                </dl>
                            </div>

                            <!--翻页系统--{-->
                            <div class="container s_formPage">
                                <#import "../../common/page.html" as pager>
                                    <@pager.pagination page=page url="${pageUrl}" map=param style="style1" />
                            </div>
                            <!--翻页系统--}-->
                        </div>
                        <!--底部工具栏--}-->

                        <script>
                            var urls = '?search=true';
                            function sousuo(){
                                var sou = "";
                                var showName = $("#showName").val();
                                if (showName!=null&&showName!=""&&showName!="undefine"&&showName!="请输入用户名"){
                                    sou += "&showName="+showName;
                                }
                                var type = $("#type").find(".open-selected").attr("data-value");
                                if(type!=null&&type!=""&&type!="undefine"){
                                    sou += "&type="+type;
                                }
                                var status = $("#status").find(".open-selected").attr("data-value");
                                if(status!=null&&status!=""&&status!="undefine"){
                                    sou += "&status="+status;
                                }
                                var url=urls+sou
                                location.href=url;
                            }
                        </script>
                    </div>
    </div>
</div>
<div class="mc-b"><#include "../foot.html"></div>
<#include "../jsPage.html">
</body>
</html>
